import React, { Component } from 'react'
import {Switch,Route,Redirect} from 'react-router-dom'
//详情页组件
import Detail from '../components/Detail/Detail'
//首页组件
import Sy from '../components/Sy/Sy'
//所以商品组件
import Sysp from '../components/Sysp/Sysp'
//最新成交组件
import Zxcj from '../components/Zxcj/Zxcj'
//兑换商城组件
import Dhsc from '../components/Dhsc/Dhsc'
//我的组件
import Wd from '../components/Wd/Wd'
export default class Router extends Component {
    render() {
        return (
            <Switch>
               <Route path="/detail" component={Detail}></Route>
               <Route path="/sy" component={Sy}></Route>
                <Route path="/sysp" component={Sysp}></Route>
                <Route path="/zxcj" component={Zxcj}></Route>
                <Route path="/dhsc" component={Dhsc}></Route>
                <Route path="/wd" component={Wd}></Route>
               <Redirect to="/sy"></Redirect>
            </Switch>
        )
    }
}
